package com.chinaedu.oc.sdk.main;

import java.util.ArrayList;
import java.util.List;

import com.chinaedu.oc.sdk.bo.Product;
import com.chinaedu.oc.sdk.bo.ProductUpload;
import com.chinaedu.oc.sdk.result.Result;
import com.chinaedu.oc.sdk.service.ProductUploadService;

public class Main {

	public static void main(String[] args) {
		ProductUploadService ps = new ProductUploadService();
		
		//批量推送产品
		//for(int i=0; i<10; i++) {
			ProductUpload p = new ProductUpload();
			Product product = new Product();
			product.setBillType("1");
			//需要改
			product.setCode("A025YS00"+1);
			product.setProductType("1");
			product.setProductLineCode("A0241");
			product.setExpiryLength("10");
			product.setGrade("0203");
			//建议改
			product.setName("高考冲刺");
			product.setSchoolLevel("02");
			product.setSchoolSystem("2");
			product.setBusinessType("2");
			product.setSpecialty("08");
			product.setTimeLength("100");
			product.setUnit("1");
			product.setDepartment("1");
		
			p.setProduct(product );
			
			List<String> listArea = new ArrayList<String>();
			listArea.add("360121");
			listArea.add("511302");
			p.setListArea(listArea );
			
			Result r = ps.upload("http://172.16.9.115:8081/oc-service/product/add", "4115c786-bdda-4bcb-8b53-e2d5aa998f4e", p);
			
			System.out.println(r);
		//}
	}
}
